package com.gzs.learn.payment.pay;

import org.apache.commons.lang3.StringUtils;

/**
 * @author zhisong.guan
 */

public enum PaymentTypeEnum {
    /** 支付宝 */
    ALIPAY,
    /** 微信支付 */
    WECHAT,
    /** 银联支付 */
    UNIONPAY;

    public static PaymentTypeEnum convert(String name) {
        for (PaymentTypeEnum e : values()) {
            if (StringUtils.equalsIgnoreCase(name, e.name())) {
                return e;
            }
        }
        return null;
    }
}
